Add some automation for Coverity.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 13 Feb 2014 03:11:50 +0000 (03:11 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 13 Feb 2014 03:11:50 +0000 (03:11 +0000)
git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4735 f51c46e8-681c-474f-0cfe-069cfd0219fb

gpsbabel/Makefile.in
gpsbabel/coverity_model.cc [new file with mode: 0644]

index cd17c269a1392d0da2adb8de22b373d3dee72245..e4299e61404a13d3809e931cc7a7d7ada515d6de 100644 (file)
@@ -417,6 +417,14 @@ test-release: doc gpsbabel.html changes.html
        rm -f gpsbabel-$(VERSIOND)/internal_styles.cc
        make release-tarball release-winbuild release-rpm
 
+# Build entire tree, upload to Coverity.
+cov-upload: FORCE
+       make clean
+       cov-build --dir cov-int make
+       echo If that says 100%, press enter. Otherwise interrupt.
+       read junk
+       cov-upload
+
 # Machine generated from here down. 
 alan.o: alan.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h gbfile.h \
   cet.h cet_util.h inifile.h session.h src/core/datetime.h
diff --git a/gpsbabel/coverity_model.cc b/gpsbabel/coverity_model.cc
new file mode 100644 (file)
index 0000000..35ea8a1
--- /dev/null
@@ -0,0 +1,37 @@
+// This file is never compiled or linked into GPSBabel itself; it exists
+// solely so we can VC the model of things we have to tell Coverity about
+// to shush bogus positives.
+
+void fatal(const char *msg, ...) {
+  __coverity_panic__();
+}
+
+// Forward decls to make the signature match.
+class Waypoint; 
+class route_head;
+class QString;
+class route;
+
+// These functions "claim" their arguments 
+void
+waypt_add(Waypoint* wpt) {
+  __coverity_escape__;
+}
+
+
+void track_add_head(route_head* rte) {
+  __coverity_escape__;
+}
+void route_add_head(route_head* rte) {
+  __coverity_escape__;
+}
+void route_add_wpt(route_head* rte, Waypoint* wpt) {
+  __coverity_escape__;
+}
+void track_add_wpt(route_head* rte, Waypoint* wpt) {
+  __coverity_escape__;
+}
+void route_add_wpt_named(route_head* rte, Waypoint* wpt, 
+                         const QString& namepart, int number_digits) {
+  __coverity_escape__;
+}